﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using PrismMetroSample.Infrastructure.Utility;

namespace PrismMetroSample.Shell.ViewModels
{
    public class MyRequiredAttribute : RequiredAttribute
    {
        /// <summary>
        /// 格式错误返回消息 非时间格式会触发 本例不需要重写
        /// </summary>
        /// <param name="name"></param>
        /// <returns></returns>
        public override string FormatErrorMessage(string name)
        {
            var msg = ResourceHelper.GetValue("Info_CodeBehind");

            return msg;
            //base.FormatErrorMessage(name)
        }
    }
}
